<html>
<head>
<title>Member</title>
</head>
<body>
<?php
function isLogin($_id,$_password,$_tipe){
		$conn = oci_connect("zipzip", "zipzip", "//localhost/XE");
		if (!$conn) {
			echo "Koneksi Ke Database Gagal";
			exit;
		}
		$q = "select id, password from member where id=$_id";
		$rs = oci_parse($conn,$q);
		oci_execute($rs);
		$dt=oci_fetch_assoc($rs);
			if($_id=="12345" && $_password=="12345"){
				include("FormTambahMember.php");
				showTambahMember();
			}
			else if($dt["PASSWORD"]==$_password && $dt["ID"]==$_id){
				include("FormDataKonsumendanBarang.php");
				showFormBarang();
			}else{
				?>
                <form action="Home.php">
                <center><h1>USERNAME ATAU PASSWORD SALAH</h1>
				<input type="submit" value="OK" />
                </center>
                </form>
                <?php			
			}
	}		
	$id=$_POST['id'];
	$password=$_POST['password'];
	$tipe=$_POST['tipe'];
	isLogin($id,$password,$tipe);		
?>
</body>
</html>
